﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ShiCaiWang1
{
    public partial class L_Project_initiated_3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void button3_Previous_Click(object sender, EventArgs e)
        {
            Response.Redirect("L_Project_initiated_2.aspx");
        }

        protected void button_step_Click(object sender, EventArgs e)
        {
            Response.Redirect("L_Project_initiated_4.aspx");
        }

        protected void btn_scfm2_Click(object sender, ImageClickEventArgs e)
        {
            string fileName = FileUpload2.FileName;//获取上传名称
            if (!string.IsNullOrWhiteSpace(fileName))
            {
                string fileFix = fileName.Substring(fileName.LastIndexOf('.') + 1).ToLower();//获取上传文件后缀名
                if (fileFix != "png" && fileFix != "jpg" && fileFix != "jpeg" && fileFix != "pic")
                {
                    Response.Write("<Script> alert('上传失败') </script>");
                }
                else
                {
                    FileUpload2.SaveAs(Server.MapPath("." + "//imgaes//" + fileName));
                    //Response.Write("<Script> alert('上传成功') </script>");
                }
            }
            else
            {

            }
        }

        protected void button_nosave_Click(object sender, EventArgs e)
        {
            if (TextBox_amount.Text!=""|| TextArea_content.Value!=""|| TextBox_Quota.Text!="0"|| TextBox_Shipping.Text!="0"|| TextBox_end.Text!="0")
            {

            }
            else
            {
                Label_pd.Text = "信息不完整！！！";
            }
        }

        protected void button_save_Click(object sender, EventArgs e)
        {
            GridView_tab.EditIndex = -1;
            TextBox_amount.Text = "";
            TextArea_content.Value = "";
            TextBox_Quota.Text = "0";
            TextBox_Shipping.Text = "0";
            TextBox_end.Text = "0";
        }
    }
}